package vn.demand.dragon.controller
{
	import org.puremvc.as3.interfaces.INotification;
	import org.puremvc.as3.patterns.command.SimpleCommand;
	
	import vn.demand.dragon.model.UserProxy;
	import vn.demand.dragon.view.LoginDialogMediator;
	
	public class RequestLogoutCommand extends SimpleCommand 
	{
		override public function execute( note:INotification ) : void    
		{
			var userProxy:UserProxy = facade.retrieveProxy(UserProxy.NAME) as UserProxy;
			userProxy.logout();
			
			var mediator:LoginDialogMediator = facade.retrieveMediator(LoginDialogMediator.NAME) as LoginDialogMediator;
			
			mediator.show();
		}

	}
}